import { createApp } from 'vue';

import ArcoVueIcon from '@arco-design/web-vue/es/icon';
import '@arco-design/web-vue/es/message/style/css.js';

import { setupStore } from '@/store';
import { setupRouter } from '@/router';
import { setupI18n } from '@/locale';

import SvgIcon from '@/components/SvgIcon/index.vue';
import 'virtual:svg-icons-register';

import './permission';
import App from './App.vue';

import '@/styles/common.css';

// 创建vue实例
const app = createApp(App);

app.component('SvgIcon', SvgIcon);

// 挂载pinia
setupStore(app);

// 挂载路由
setupRouter(app);

// 挂载国际化
setupI18n(app);

// 挂载arcicon
app.use(ArcoVueIcon);

// 挂载实例
app.mount('#app');
